(function () {
    angular.module('app')
        .component('xxDrugManager',{
            templateUrl:'/app/drug-manager/drug-manager/drug-manager.html',
            controller:ctrl
        });

    function ctrl($scope,$state,userService) {
        $scope.username = userService.user['username'];

        $scope.stockManage = function (){
            $state.go('drug-manager.stock-manage');
        };
        $scope.orderProcessing = function (){
            $state.go('drug-manager.order-processing');
        };
        $scope.personInfo = function () {
            $state.go('user.person-info');
        };
        $scope.login = function () {
            $state.go('login');
        };
        $scope.logout = function () {
            $state.go('login');
        };
    }
})();